package com.tensquare.search.dao;

import com.tensquare.search.pojo.Article;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

/**
 * 文章 ElasticSearch Data.
 *
 * @author 宫新程
 * @since 2019/3/4 15:02
 */
public interface ArticleDao extends ElasticsearchRepository<Article, String> {

  /** 根据key搜索. */
  Page<Article> findByTitleLikeOrContentLike(String title, String content, Pageable pageable);
}
